﻿using System;
using System.Web;
using System.Web.SessionState;
using VelocityShop.Entities;

namespace VelocityShop.Web.UI
{
    public class UserSession
    {
        private static HttpSessionState CurrentSession
        {
            get { return HttpContext.Current.Session; }
        }

        public static Cart ShoppingCart
        {
            get
            {

                if (CurrentSession["ShoppingCart"] == null)
                {
                    CurrentSession["ShoppingCart"] = new Cart();
                }

                return (Cart)CurrentSession["ShoppingCart"];

            }
        }

    }
}
